jobs:

- job: core_tests
  timeoutInMinutes: 60
  steps:

  # Run all core tests when running the Windows CI tests
  - task: Gradle@2
    condition: eq(variables['Agent.OS'], 'Windows_NT')
    displayName: Build & test (Windows - core)
    env:
      AWS_ACCESS_KEY_ID: $(aws.accessKeyId)
      AWS_SECRET_ACCESS_KEY: $(aws.secretAccessKey)
    inputs:
        gradleWrapperFile: 'gradlew'
        jdkVersionOption: '1.8'
        options: '--no-daemon --continue'
        tasks: 'clean testcontainers:check'
        publishJUnitResults: true
        testResultsFiles: '**/TEST-*.xml'

- job: other_tests
  timeoutInMinutes: 120
  steps:
  # Run all non-core tests when running the Windows CI tests
  - task: Gradle@2
    condition: eq(variables['Agent.OS'], 'Windows_NT')
    displayName: Build & test (Windows - all non-core modules)
    env:
      AWS_ACCESS_KEY_ID: $(aws.accessKeyId)
      AWS_SECRET_ACCESS_KEY: $(aws.secretAccessKey)
    inputs:
        gradleWrapperFile: 'gradlew'
        jdkVersionOption: '1.8'
        options: '--no-daemon --continue'
        tasks: 'clean check -x testcontainers:test'
        publishJUnitResults: true
        testResultsFiles: '**/TEST-*.xml'
